import {system} from "../function_menu/dispatch";
let staffManagement = system("staffManagement", ["form", "search", "formGet"], {
  state: {
    idKey:"userId",
    roleKey:"roleId",
    updateAvatarId: '',
  },
  mutations: {
    updateInfo(state, par) {
      console.log(state, par)
      if(par[1] instanceof Array){
          state[par[0]] = par[1];
      }else {
          state[par[0]] = Object.assign({}, state[par[0]]  , par[1]);
      }
    },
    // updateAvatar(state, par) {
    //   console.log(state[par[0]])
    //   console.log(par)
    // }
  }

})

export default staffManagement;
